import http from "http"
import pblic from "./pblic"
import queryData from "./queryData"
import httpEnd from "./htttpEnd"

import err from "./err_404"



const server = http.createServer((req, res) => {
    queryData(req, res, () => {
        console.log(req.method);
        console.log(12345699999);
        if (pblic(req, res)) return;
        
  
        //判断请求方式
        if(httpEnd(req, res,req.method))return;
        err(req, res)
    })
})
server.listen(5000, () => {
    console.log("5000服务器启动");
})